package top.z.work.module.system.controller.dict.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

@Data
@Accessors(chain = true)
@Schema(description = "系统管理 - 字典数据 VO")
public class SystemDictDataCreateVO {

    @Length(min = 1, max = 50, message = "字典类型ID长度只能在1到50个字符之间")
    @NotBlank(message = "字典类型编码不能为空")
    @Schema(title = "字典类型编码", description = "字典类型编码", example = "1234")
    private String parent;

    @Length(min = 1, max = 100, message = "字典数据名称长度只能在1到100个字符之间")
    @NotBlank(message = "字典数据名称不能为空")
    @Schema(title = "字典数据名称", description = "字典数据名称", example = "测试配置")
    private String name;

    @Length(min = 1, max = 100, message = "字典键长度只能在1到100个字符之间")
    @NotBlank(message = "字典键不能为空")
    @Schema(title = "字典键", description = "字典键", example = "test_config")
    private String code;

    @Length(min = 1, max = 100, message = "字典值长度只能在1到100个字符之间")
    @NotBlank(message = "字典值不能为空")
    @Schema(title = "字典值", description = "字典值", example = "1")
    private String value;

    @NotNull(message = "字典排序不能为空")
    @Schema(title = "字典排序", description = "字典排序", example = "1")
    private Integer sort;

}
